package com.ailesson.user.feign;

import com.ailesson.common.reply.R;
import com.ailesson.user.dto.UserInfoDto;
import com.ailesson.user.dto.UserInfoSimpleDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("user-service")
public interface UserFeignClient {

    @GetMapping("/user/userinfo/info/{id}")
    R<UserInfoDto> info(@PathVariable("id") Long id);

    @PostMapping("/user/userinfo/info/batch-simple")
    R<List<UserInfoSimpleDto>> batchSimple(@RequestBody List<Long> ids);
}
